<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //1、两个及以上参数
        const sum = (num1,num2) => {
            return num1 + num2
        }

        //2、只有一个参数,括号可以省掉
        const power = num => {
            return num * num
        }

        //3、函数代码块中有多行代码
        const test = () => {
            console.log('苏州大学')
            console.log('养天地正气,法古今完人')
        }

        //4、函数代码块中只有一行代码,大括号和 return 也可以省略,不管有无返回值均可
        const mul = (num1,num2) => num1 * num2
        console.log(mul(20,30))
    </script>
</body>
</html>